﻿namespace Model.Entites
{
    /// <summary>
    /// 用户信息实体类
    /// </summary>
    [SugarTable("T_Customerinfo")]
    public class TCustomerinfo : ModelStatusBase
    {
        /// <summary>
        /// 会员头像
        /// </summary>
        [SugarColumn(ColumnDataType = "LONGTEXT", IsNullable = true)]
        public string Avatar { get; set; }

        /// <summary>
        /// 会员昵称
        /// </summary>
        public string NickName { get; set; }

        /// <summary>
        /// 联系电话
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string Phone { get; set; }

        /// <summary>
        /// 邮箱
        /// </summary>
        public string Email { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        [SugarColumn(ColumnDataType = "LONGTEXT")]
        public string Password { get; set; }

        /// <summary>
        /// 生日
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public DateTime? Birthday { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public Enum_Sex? Sex { get; set; }

        /// <summary>
        /// 性别描述
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string SexDesc { get; set; }

        /// <summary>
        /// Token
        /// </summary>
        [SugarColumn(ColumnDataType = "LONGTEXT", IsNullable = true)]
        public string Token { get; set; }

        /// <summary>
        /// 会员ID
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string IdCode => $"{1000000 + Id}";

        /// <summary>
        /// 最后登录时间
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public DateTime? LastLoginDate { get; set; }

        /// <summary>
        /// 有效期
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public DateTime? ExpireTime { get; set; }
    }
}